import axios from '../../utils/axios'
const rang={
    // 添加评论
    addComment(data){
        return axios.post('/comment/add',data)
    },
    // 回复评论
    replyComment(data){
        return axios.post('/comment/reply',data)
    },
    // 靶场验证falg是否正确
    trueFlag(data){
        return axios.post('/flag/match',data)
    },
    // 首页查询靶场信息
    findRangAll(data){
        return axios.get(`/target/findAll`,{
            params:data
        })
    },
    // 条件查询靶场信息
    findRangByCondtion(data){
        return axios.post('/target/findByCondition',data)
    },
    // id查询靶场信息
    findRangById(id){
        return axios.get(`/target/afindByTid/2`)
    },
    // 添加收藏
    addCollect(uid,tid){
        return axios({
            url:'/colllect/addUser',
            method:'POST',
            params:{
                uid,tid
            }
            
        })
    },
    // 删除收藏
    delCollect(uid,tid){
        return axios({
            url:'/colllect/del',
            method:'DELETE',
            params:{
                uid,tid
            }
            
        })
    },
    // 查询所有收藏
    findAllCollect(id){
        return axios.get('/colllect/findUserCollect',{
            params:id
        })
    }
}

export default rang

